<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>JavaScript操作JSON常用方法 | 欢迎来到guo的博客!</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="一、概念简介JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式，采用完全独立于语言的文本格式，是理想的数据交换格式。同时，JSON是 JavaScript 原生格式，这意味着在 JavaScript 中处理 JSON数据不须要任何特殊的 API 或工具包。在JSON中，有两种结构：对象和数组。 1.对象1var packJson &#x3D; &amp;#123;&amp;quot">
<meta property="og:type" content="article">
<meta property="og:title" content="JavaScript操作JSON常用方法">
<meta property="og:url" content="http://shangguan-lingfeng.gitee.io/blog1/2021/04/09/JavaScript%E6%93%8D%E4%BD%9CJSON%E5%B8%B8%E7%94%A8%E6%96%B9%E6%B3%95/index.html">
<meta property="og:site_name" content="欢迎来到guo的博客!">
<meta property="og:description" content="一、概念简介JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式，采用完全独立于语言的文本格式，是理想的数据交换格式。同时，JSON是 JavaScript 原生格式，这意味着在 JavaScript 中处理 JSON数据不须要任何特殊的 API 或工具包。在JSON中，有两种结构：对象和数组。 1.对象1var packJson &#x3D; &amp;#123;&amp;quot">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115259937">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115303650">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115308822">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115312432">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115320046">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115324375">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115329119">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115334578">
<meta property="og:image" content="https://img-blog.csdn.net/20161028115338995">
<meta property="article:published_time" content="2021-04-09T08:06:49.590Z">
<meta property="article:modified_time" content="2021-04-09T08:26:23.033Z">
<meta property="article:author" content="Jerry">
<meta property="article:tag" content="vue">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img-blog.csdn.net/20161028115259937">
  
    <link rel="alternate" href="/blog1/atom.xml" title="欢迎来到guo的博客!" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/blog1/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/blog1/css/style.css">

  
    
<link rel="stylesheet" href="/blog1/fancybox/jquery.fancybox.min.css">

  
<meta name="generator" content="Hexo 5.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/blog1/" id="logo">欢迎来到guo的博客!</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/blog1/">Home</a>
        
          <a class="main-nav-link" href="/blog1/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/blog1/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Suche"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Suche"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://shangguan-lingfeng.gitee.io/blog1"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-JavaScript操作JSON常用方法" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/blog1/2021/04/09/JavaScript%E6%93%8D%E4%BD%9CJSON%E5%B8%B8%E7%94%A8%E6%96%B9%E6%B3%95/" class="article-date">
  <time class="dt-published" datetime="2021-04-09T08:06:49.590Z" itemprop="datePublished">2021-04-09</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      JavaScript操作JSON常用方法
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <h3 id="一、概念简介"><a href="#一、概念简介" class="headerlink" title="一、概念简介"></a>一、概念简介</h3><p>JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式，采用完全独立于语言的文本格式，是理想的数据交换格式。同时，JSON是 JavaScript 原生格式，这意味着在 JavaScript 中处理 JSON数据不须要任何特殊的 API 或工具包。<br>在JSON中，有两种结构：对象和数组。</p>
<h4 id="1-对象"><a href="#1-对象" class="headerlink" title="1.对象"></a>1.对象</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> packJson = &#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Liza&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;123&quot;</span>&#125;;</span><br></pre></td></tr></table></figure>
<p>一个对象以“{”开始，“}”结束，“key/value”之间运用 “,”分隔。</p>
<h4 id="2-数组"><a href="#2-数组" class="headerlink" title="2.数组"></a>2.数组</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> packJson = [&#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Liza&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;123&quot;</span>&#125;, &#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Mike&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;456&quot;</span>&#125;];</span><br></pre></td></tr></table></figure>
<p>数组是值的有序集合。一个数组以“[”开始，“]”结束。值之间运用 “,”分隔。</p>
<h3 id="二、JSON对象和JSON字符串的转换"><a href="#二、JSON对象和JSON字符串的转换" class="headerlink" title="二、JSON对象和JSON字符串的转换"></a>二、JSON对象和JSON字符串的转换</h3><p>在数据传输过程中，JSON是以字符串的形式传递的，而JS操作的是JSON对象，所以，JSON对象和JSON字符串之间的相互转换是关键。例如：</p>
<p>JSON字符串：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> jsonStr =<span class="string">&#x27;&#123;&quot;name&quot;:&quot;Liza&quot;, &quot;password&quot;:&quot;123&quot;&#125;&#x27;</span> ;</span><br></pre></td></tr></table></figure>
<p>JSON对象：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> jsonObj = &#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Liza&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;123&quot;</span>&#125;;</span><br></pre></td></tr></table></figure>
<h4 id="1、-JSON字符串转化-JSON对象"><a href="#1、-JSON字符串转化-JSON对象" class="headerlink" title="1、 JSON字符串转化 JSON对象"></a>1、 JSON字符串转化 JSON对象</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> jsonObject= jQuery.parseJSON(jsonstr);</span><br></pre></td></tr></table></figure>
<h4 id="2、-JSON对象转化-JSON-字符串"><a href="#2、-JSON对象转化-JSON-字符串" class="headerlink" title="2、 JSON对象转化 JSON 字符串"></a>2、 JSON对象转化 JSON 字符串</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> jsonstr =<span class="built_in">JSON</span>.stringify(jsonObject );</span><br></pre></td></tr></table></figure>
<h3 id="三、JSON的输出美化"><a href="#三、JSON的输出美化" class="headerlink" title="三、JSON的输出美化"></a>三、JSON的输出美化</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">JSON.stringify(value[, replacer [, space]])</span><br></pre></td></tr></table></figure>
<p>上一节讲到了将JSON转化为字符串可以用JSON.stringify() 方法，stringify还有个可选参数space，可以指定缩进用的空白字符串，用于美化输出（pretty-print）；<br>space参数是个数字，它代表有多少的空格；上限为10。该值若小于1，则意味着没有空格；如果该参数没有提供（或者为null）将没有空格。</p>
<p>我们看下代码：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> formatJsonStr=<span class="built_in">JSON</span>.stringify(jsonObject,<span class="literal">undefined</span>, <span class="number">2</span>);</span><br></pre></td></tr></table></figure>

<p>待美化的JSON：<br><img src="https://img-blog.csdn.net/20161028115259937" alt="美化前的JSON"></p>
<p>美化后的效果：<br><img src="https://img-blog.csdn.net/20161028115303650" alt="美化后的JSON"></p>
<h3 id="四、JSON字符串的替换"><a href="#四、JSON字符串的替换" class="headerlink" title="四、JSON字符串的替换"></a>四、JSON字符串的替换</h3><p>工作经常遇到这样的字符串，如下：<br><img src="https://img-blog.csdn.net/20161028115308822" alt="替换前的JSON"></p>
<p>需要经过替换后，才能从字符串转化成JSON对象。这里我们需要用JS实现replaceAll的功能， 将所有的 ‘ \“ ‘ 替换成 ‘ “ ‘ .<br>代码如下,这里的gm是固定的，g表示global，m表示multiple：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> jsonStr=jsonStr.replace(<span class="keyword">new</span> <span class="built_in">RegExp</span>(<span class="string">&#x27;\\&quot;&#x27;</span>,<span class="string">&quot;gm&quot;</span>), <span class="string">&#x27;&quot;&#x27;</span> );</span><br></pre></td></tr></table></figure>
<p>替换后的效果如下：<br><img src="https://img-blog.csdn.net/20161028115312432" alt="替换后的JSON"></p>
<h3 id="五、遍历JSON对象和JSON数组"><a href="#五、遍历JSON对象和JSON数组" class="headerlink" title="五、遍历JSON对象和JSON数组"></a>五、遍历JSON对象和JSON数组</h3><h4 id="1、遍历JSON对象代码如下："><a href="#1、遍历JSON对象代码如下：" class="headerlink" title="1、遍历JSON对象代码如下："></a>1、遍历JSON对象代码如下：</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> packJson  = &#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Liza&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;123&quot;</span>&#125; ;</span><br><span class="line"><span class="keyword">for</span>(<span class="keyword">var</span> k <span class="keyword">in</span> packJson )&#123;<span class="comment">//遍历packJson 对象的每个key/value对,k为key</span></span><br><span class="line">   alert(k + <span class="string">&quot; &quot;</span> + packJson[k]);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="2、遍历JSON数组代码如下："><a href="#2、遍历JSON数组代码如下：" class="headerlink" title="2、遍历JSON数组代码如下："></a>2、遍历JSON数组代码如下：</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> packJson = [&#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Liza&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;123&quot;</span>&#125;, &#123;<span class="string">&quot;name&quot;</span>:<span class="string">&quot;Mike&quot;</span>, <span class="string">&quot;password&quot;</span>:<span class="string">&quot;456&quot;</span>&#125;];</span><br><span class="line"><span class="keyword">for</span>(<span class="keyword">var</span> i <span class="keyword">in</span> packJson)&#123;<span class="comment">//遍历packJson 数组时，i为索引</span></span><br><span class="line">   alert(packJson[i].name + <span class="string">&quot; &quot;</span> + packJson[i].password);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="六、递归遍历"><a href="#六、递归遍历" class="headerlink" title="六、递归遍历"></a>六、递归遍历</h3><p>为了实现一些复杂功能常常需要递归遍历JSON对象，这里给出两个递归的例子，希望能给大家参考递归的写法。</p>
<h4 id="1、第一个例子是递归遍历JSON，遇到数组的时候，数组中有超过一个对象，删除第一个对象之后的所有对象"><a href="#1、第一个例子是递归遍历JSON，遇到数组的时候，数组中有超过一个对象，删除第一个对象之后的所有对象" class="headerlink" title="1、第一个例子是递归遍历JSON，遇到数组的时候，数组中有超过一个对象，删除第一个对象之后的所有对象"></a>1、第一个例子是递归遍历JSON，遇到数组的时候，数组中有超过一个对象，删除第一个对象之后的所有对象</h4><p>举个例子，原始JSON如下：<br><img src="https://img-blog.csdn.net/20161028115320046" alt="原始JSON"></p>
<p>期望处理后的JSON如下：<br><img src="https://img-blog.csdn.net/20161028115324375" alt="处理后的JSON"></p>
<p>递归代码如下：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> *返回处理后的 json字符串</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">jsonParse</span>(<span class="params">jsonObj</span>) </span>&#123;</span><br><span class="line">     </span><br><span class="line">      distinctJson(jsonObj);</span><br><span class="line">      <span class="keyword">var</span> last=<span class="built_in">JSON</span>.stringify(jsonObj, <span class="literal">undefined</span>, <span class="number">2</span>);</span><br><span class="line">      <span class="keyword">return</span> last;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

 <figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 去掉 json中数组多余的项</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">distinctJson</span>(<span class="params">obj</span>) </span>&#123;</span><br><span class="line">      <span class="keyword">if</span>(obj <span class="keyword">instanceof</span> <span class="built_in">Array</span>) &#123;</span><br><span class="line">             <span class="keyword">if</span>(obj.length &gt; <span class="number">1</span>) &#123; <span class="comment">//数组中有超过一个对象，删除第一个对象之后的所有对象</span></span><br><span class="line">                  obj.splice(<span class="number">1</span>, (obj.length - <span class="number">1</span>));</span><br><span class="line">            &#125;</span><br><span class="line">            distinctJson(obj[<span class="number">0</span>]);</span><br><span class="line">      &#125; <span class="keyword">else</span> <span class="keyword">if</span>(obj <span class="keyword">instanceof</span> <span class="built_in">Object</span>) &#123;</span><br><span class="line">             <span class="keyword">for</span>( <span class="keyword">var</span> index <span class="keyword">in</span> obj)&#123;</span><br><span class="line">                   <span class="keyword">var</span> jsonValue = obj[index];</span><br><span class="line">                  distinctJson(jsonValue);</span><br><span class="line">            &#125;</span><br><span class="line">      &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h4 id="2、第二个例子是递归查找目标节点（节点id为targetId，有且只有一个），找到后把targetChildren赋值给节点的children，"><a href="#2、第二个例子是递归查找目标节点（节点id为targetId，有且只有一个），找到后把targetChildren赋值给节点的children，" class="headerlink" title="2、第二个例子是递归查找目标节点（节点id为targetId，有且只有一个），找到后把targetChildren赋值给节点的children，"></a>2、第二个例子是递归查找目标节点（节点id为targetId，有且只有一个），找到后把targetChildren赋值给节点的children，</h4><p>举个例子，原始JSON如下，查找的目标节点id为5：<br><img src="https://img-blog.csdn.net/20161028115329119" alt="原始JSON"></p>
<p>targetChildren为<br><img src="https://img-blog.csdn.net/20161028115334578" alt="targetChildren的JSON"></p>
<p>期望最后处理的JSON结果为：<br><img src="https://img-blog.csdn.net/20161028115338995" alt="期望后的JSON"></p>
<p>递归代码如下：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 递归查找目标节点</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">findTarget</span>(<span class="params">obj,targetId,targetChildren</span>)</span>&#123;</span><br><span class="line">    <span class="keyword">if</span>(obj.id==targetId)&#123;</span><br><span class="line">          obj.children=targetChildren;</span><br><span class="line">          <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line">    &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">          <span class="keyword">if</span>(obj.children!=<span class="literal">null</span>)&#123;</span><br><span class="line">               <span class="keyword">for</span>(<span class="keyword">var</span> i=<span class="number">0</span>; i&lt;obj.children.length; i++)&#123;</span><br><span class="line">                    <span class="keyword">var</span> flag=findTarget(obj.children[i],targetId,targetChildren);</span><br><span class="line">                    <span class="keyword">if</span>(flag==<span class="literal">true</span>)&#123;</span><br><span class="line">                          <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line">                    &#125;</span><br><span class="line">               &#125;</span><br><span class="line">          &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">return</span> <span class="literal">false</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>————————————————<br>版权声明：本文为CSDN博主「徐小妖」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。<br>原文链接：<a target="_blank" rel="noopener" href="https://blog.csdn.net/xujie3/article/details/52954940">https://blog.csdn.net/xujie3/article/details/52954940</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://shangguan-lingfeng.gitee.io/blog1/2021/04/09/JavaScript%E6%93%8D%E4%BD%9CJSON%E5%B8%B8%E7%94%A8%E6%96%B9%E6%B3%95/" data-id="cknublgbc0003v8uhhbs56scy" data-title="JavaScript操作JSON常用方法" class="article-share-link">Teilen</a>
      
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog1/tags/vue/" rel="tag">vue</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/blog1/2021/04/12/Django%E4%B8%ADchoices%E8%AE%BE%E7%BD%AE%E7%9A%84%E6%93%8D%E4%BD%9C/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Neuer</strong>
      <div class="article-nav-title">
        
          django中choices设置的操作
        
      </div>
    </a>
  
  
    <a href="/blog1/2021/04/07/gitee%E6%8F%90%E4%BA%A4%E5%88%B0%E4%BB%96%E4%BA%BA%E4%BB%93%E5%BA%93/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Älter</strong>
      <div class="article-nav-title">gitee提交到他人仓库</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/CentOS/" rel="tag">CentOS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/Flask/" rel="tag">Flask</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/django/" rel="tag">django</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/docker/" rel="tag">docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/gitee/" rel="tag">gitee</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/linux/" rel="tag">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/mysql/" rel="tag">mysql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/python/" rel="tag">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/python%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" rel="tag">python基础知识</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/vue/" rel="tag">vue</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/webshell/" rel="tag">webshell</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/%E4%BA%91%E4%B8%BB%E6%9C%BA%E5%AE%9E%E7%8E%B0%E8%A7%86%E9%A2%91%E7%9B%B4%E6%92%AD/" rel="tag">云主机实现视频直播</a></li><li class="tag-list-item"><a class="tag-list-link" href="/blog1/tags/%E5%85%B3%E4%BA%8E%E7%AC%AC%E4%B8%89%E6%96%B9/" rel="tag">关于第三方</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/blog1/tags/CentOS/" style="font-size: 17.5px;">CentOS</a> <a href="/blog1/tags/Flask/" style="font-size: 10px;">Flask</a> <a href="/blog1/tags/django/" style="font-size: 12.5px;">django</a> <a href="/blog1/tags/docker/" style="font-size: 12.5px;">docker</a> <a href="/blog1/tags/gitee/" style="font-size: 10px;">gitee</a> <a href="/blog1/tags/linux/" style="font-size: 10px;">linux</a> <a href="/blog1/tags/mysql/" style="font-size: 12.5px;">mysql</a> <a href="/blog1/tags/python/" style="font-size: 15px;">python</a> <a href="/blog1/tags/python%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" style="font-size: 17.5px;">python基础知识</a> <a href="/blog1/tags/redis/" style="font-size: 12.5px;">redis</a> <a href="/blog1/tags/vue/" style="font-size: 20px;">vue</a> <a href="/blog1/tags/webshell/" style="font-size: 10px;">webshell</a> <a href="/blog1/tags/%E4%BA%91%E4%B8%BB%E6%9C%BA%E5%AE%9E%E7%8E%B0%E8%A7%86%E9%A2%91%E7%9B%B4%E6%92%AD/" style="font-size: 10px;">云主机实现视频直播</a> <a href="/blog1/tags/%E5%85%B3%E4%BA%8E%E7%AC%AC%E4%B8%89%E6%96%B9/" style="font-size: 12.5px;">关于第三方</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archiv</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/05/">五月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/04/">四月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/03/">三月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/02/">二月 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/blog1/archives/2021/01/">一月 2021</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">letzter Beitrag</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/blog1/2021/05/14/docker+CentOS+mysql%E5%AE%9E%E7%8E%B0%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5/">docker+CentOS+mysql实现主从同步</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/13/mysql%E5%AE%9E%E7%8E%B0%E8%AF%BB%E5%86%99%E5%88%86%E7%A6%BB(%E5%9C%A8%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5%E5%9F%BA%E7%A1%80%E4%B8%8A)/">mysql实现读写分离</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/12/%E5%9C%A8%E9%A1%B9%E7%9B%AE%E4%B8%AD%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3/">在项目中自动生成接口文档</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/12/mysql%E5%AE%9E%E7%8E%B0%E4%B8%BB%E4%BB%8E%E5%90%8C%E6%AD%A5/">mysql实现主从同步</a>
          </li>
        
          <li>
            <a href="/blog1/2021/05/09/CentOS%E9%83%A8%E7%BD%B2flask%E9%A1%B9%E7%9B%AE/">nginx部署flask项目</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2021 Jerry<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/blog1/" class="mobile-nav-link">Home</a>
  
    <a href="/blog1/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/blog1/js/jquery-3.4.1.min.js"></script>



  
<script src="/blog1/fancybox/jquery.fancybox.min.js"></script>




<script src="/blog1/js/script.js"></script>





  </div>
</body>
</html>